<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no" />
    <title>设置</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../../css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/mui.min.css"/>
    <style>
        body{
            background: #f3f3f3;
            font-size: 14px;
        }
        .aui-icon-left{
            padding-left:10px;
        }

        .aui-slide-page-active{
            background: #327afa;
        }
        header {
            width: 100%;
            height: 45px;
            background: #fff;
            position: relative;
            z-index: 9;
            margin-bottom: 15px;
        }
        .win_title{
            text-align: center;
            width: 100%;
            line-height: 45px;
            height: 45px;
            font-size: 16px;
        }
        .aui-iconfont{
         position: absolute;
        }
        .aui-list-view:after{
            border:none;
        }
        .aui-pull-right{
            margin-right:20px;
        }
        .cancel{
            background: #d7e5ff;
            border-color: #d7e5ff;
            color: #327afa;
            width: 50%;
            float: left;
        }
        .confirm{
            width: 50%;
            float: left;
        }
    </style>
</head>
<body>
    <header class="myBorder">
        <div class="win_title aui-border-b"> 
            <div class="aui-pull-left aui-iconfont aui-icon-left icon-left-coler" tapmode onclick="closeWin()"></div>
            <div class="">
                设置
            </div>
        </div> 
    </header>
    <div class="contain">  
        <ul class="aui-list-view">
            <li class="aui-list-view-cell" tapmode onclick="openToTwo('changePwd')">
                <a class="aui-arrow-right">
                    <span class="text">修改登录密码</span>
                </a>
            </li>
        </ul>  
        <ul class="aui-list-view">
            <li class="aui-list-view-cell" >
                <a class="aui-arrow-right">
                    <span class="text">当前版本</span>
                    <span class="aui-pull-right version">1.0</span>
                </a>
            </li>
        </ul> 
        <ul class="aui-list-view">
            <li class="aui-list-view-cell" tapmode onclick="clearCache()">
                <a class="aui-arrow-right">
                    <span class="text">清除缓存</span>
                    <span class="aui-pull-right cacheSize">145.00M</span>
                </a>
            </li>
        </ul> 
    </div>
    <!--<footer class="aui-nav">-->
        <!---->
        <!--<ul>-->
            <!--<li>  -->
               <!--<div class="myBtn cancel" tapmode onclick="hidePicker()">取消</div>  -->
               <!--<div class="myBtn  confirm" tapmode onclick="setAttr(this)">保存</div>           -->
            <!--</li>-->
        <!--</ul>-->
    <!--</footer>-->
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/doT.min.js"></script>
<script type="text/javascript" src="../../script/jquery.min.js"></script>
<script type="text/javascript" src="../../script/mui.js"></script>
<script type="text/javascript">
   apiready = function() {
       api.parseTapmode();
       var mobile = api.pageParam.mobile;
       var header = $api.dom('header');
       var footer = $api.dom('footer');

       api.getCacheSize(function (ret,err) {
           var size=ret.size;
           $(".cacheSize").text(size)
       })
       $(".version").text(api.appVersion)
       //$api.fixStatusBar(header);
       api.setStatusBarStyle({
             style : 'light'
       });
   }
   function clearCache() {
       var size=$(".cacheSize").text();
       if(size==0){
           mui.alert("暂时无缓存，无需清除");
       }else{
           mui.confirm("确定要清除"+size+"M缓存？","",['是','否'],function (e) {
               if(e.index==0){
                   api.clearCache();
                   $(".cacheSize").text(0);
                   api.toast({
                       msg:"缓存已清除成功"
                   })
               }
           })
       }


   }
</script>
</html>
